Release 10.1A: OpenEdge Development:
ADM and SmartObjects
SmartObject file relationships
Within the overall SmartObject class hierarchy, the class files described in the "General structure of a SmartObject" section relate to other files of the same type in certain very specific ways. These relationships establish what characteristics and properties a specific SmartObject type inherits. Figure 5–2, which is based on the SmartDataViewer, illustrates these relationships.
Figure 5–2: Include file structure for SmartDataViewer
![]()
In Figure 5–2, note the following:
- The
smrtprop.ifile (lower left) defines an ADMProps temp-table that in turn defines the basic properties that apply to all SmartObjects. Each include file above thesmrtprop.ifile adds properties specific to the class with which it is associated. For details, see the "ADMProps temp-table and object properties" section.- The
viewer.wfile includes onlyviewer.i.- The
viewer.ifile includesdatavis.i, because a SmartDataViewer is a data visualization object. It also includesviewprop.i, which includes the prototype include fileviewprto.i.- The
datavis.ifile includesvisual.ibecause a SmartDataViewer is a visual object. It also includesdvisprop.i, which includesdvisprto.i.- The
visual.ifile includessmart.i, because a visual object is a SmartObject. Thevisual.ifile also includesvisprop.i, which includesvisprto.i.- The
smart.ifile includes onlysmrtprop.i(which includessmrtprto.i).When SmartObject code is preprocessed, the preprocessors limit the full expansion of the include files to exactly one branch of the class hierarchy, to avoid duplication of the SmartObject code.
Each SmartObject type uses a different part of the class hierarchy (different branches), but the The tree for any SmartObject type always ends with
smart.i.Figure 5–3 expands on Figure 5–2 to illustrate how super procedures are started.
Figure 5–3: Super procedure schematic for SmartDataViewer
![]()
In Figure 5–3, note the following:
- The
smart.ifile startssmart.p(if it is not already running) and adds it as a super procedure for the SmartDataViewer. Thesmart.pfile should be the top-level super procedure for all SmartObjects.- The
visual.ifile startsvisual.p, if it is not already running, and adds it as a super procedure for the SmartDataViewer.- The
datavis.ifile then startsdatavis.p(if it is not already running) and adds it as a super procedure for the SmartDataViewer.Note: The object’s own super procedure always must be added last. This is because super procedures are searched in last-in, first-out (LIFO) order, so the interpreter searches in- The
viewer.ifile startsviewer.p(if it is not already running) and adds it as a super procedure.viewer.pfirst for needed routines and insmart.plast. This ensures that more general behavior is executed last and more object-specific behavior is executed first.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |